<script setup lang="ts">
import type { OrderType } from '@/types/order'
import ConsultList from './components/ConsultList.vue'
import { ref } from 'vue'

const tabsList = [
  { label: '极速问诊', type: 2 },
  { label: '找医生', type: 1 },
  { label: '开药问诊', type: 3 }
]

const active = ref(2)
</script>

<template>
  <div class="consult-page">
    <cp-nav-bar title="问诊记录" />
    <van-tabs sticky v-model:active="active">
      <van-tab
        v-for="tab in tabsList"
        :key="tab.type"
        :name="tab.type"
        :title="tab.label"
      >
        <consult-list :type="tab.type as OrderType" />
      </van-tab>
    </van-tabs>
  </div>
</template>

<style lang="scss" scoped>
.consult-page {
  padding-top: 46px;
  background-color: var(--cp-bg);
  min-height: calc(100vh - 46px);
}
</style>
